T
Tim Smith
Remon van Vliet said:It is? for what?
Web-based X, for X in {blogs, forums, email, galleries, portals, CMS}.
Most small to medium sites that provide these use PHP, as do a few very
large ones (such as Yahoo).
Remon van Vliet said:It is? for what?
From wikipedia.org:
| De facto is a Latin expression that means "in fact" or "in practice"..
| It is commonly used in contrast to de jure (which means "by law") when
| referring to matters of law, governance, or technique (such as
| standards), that are found in the common experience as created or
| developed without or against a regulation.
Calling PHP on webservers a standard would be wrong because nobody ever
standardized it oficially. Calling it a "de-facto" standard is perfectly
valid, though.
Daniel said:I know what "de facto" means, but I still not sure that I would call it
a standard, de facto or otherwise, simply because it is popular.
Although I can see why you could argue that. To me, "standard" implies
something more than just popularity. It implies that it's popularity
would contribute to it being a better choice than some other alternative
(often to aid interoperability), and that I would be disadvantaged by
not choosing the "standard".
If 80% of people use PHP for their
server-side scripting, it doesn't make it a better choice for me than it
would be if only 10% of people used it. However, if 80% of people use
Internet Explorer then that makes its interpretation of HTML a de facto
standard, and I would be disadvantaged by choosing to ignore it when
developing a website.
Can it replace .net, php and java?
Roedy Green said:I saw some benchmarks. Ruby's flexibility has a fairly high CPU
overhead. You would not want to use it for heavy duty computation.
Ruby is clearly a lot faster to knock out code than Java, but I
suspect it may be harder to maintain without all the static type
information you get with Java.
Roedy said:I saw some benchmarks. Ruby's flexibility has a fairly high CPU
overhead. You would not want to use it for heavy duty computation.
Ruby is clearly a lot faster to knock out code than Java, but I
suspect it may be harder to maintain without all the static type
information you get with Java.
It will be interesting to see what niche it carves out for itself.
Andrew said:Actually this is not a problem. Most ruby developers are also TDDers or
at least unittesters. In fact, Ruby has Unit & Acceptance testing
framework built in. We trade the compile time type check for runtime
checks via the tests we write, which means we still have the benefits of
static languages like Java, but can also have the benefits of the
dynamic typed language.
Andrew McDonagh said:Actually this is not a problem. Most ruby developers are also TDDers or
at least unittesters. In fact, Ruby has Unit & Acceptance testing
framework built in. We trade the compile time type check for runtime
checks via the tests we write, which means we still have the benefits of
static languages like Java, but can also have the benefits of the
dynamic typed language.
Ruby is clearly a lot faster to knock out code than Java, but I
suspect it may be harder to maintain without all the static type
information you get with Java.
Erik said:Ruby is a so-called DSL, or Domain Specific Language.
Andrew said:Most ruby developers are also TDDers or
at least unittesters.
Chris said:It would, of
course, be remiss not to point out the one advantage to maintaining Ruby
code, which is that there would be less of it to maintain.
Chris said:Is that actually true ? I know that TDD/Uniters make a lot of noise, but is
that indicative of the actual numbers ?
-- chris
Chris said:These are not the same thing. The problem areas solved by static
verification tools (and, in particular, type systems) overlap slightly
with those solved by testing tools. The area of overlap is that type
systems can detect some of the same problems as testing can.
The areas where the two techniques do not overlap include the following additional
uses of types:
Type systems:
- Provide reliable documentation of code
As in IDEs?- Enable more powerful development tools
- Support program analysis tools
- Enforce simple invariants, rather than single test cases
- Allow more aggressive optimizations
Of these, the first four definitely fit under reasons that Ruby code may
be harder to maintain because of the lack of types. It would, of
course, be remiss not to point out the one advantage to maintaining Ruby
code, which is that there would be less of it to maintain.
Chris said:I think the impression conveyed by "the one advantage" is false.
Non-declarative type systems, in particular dynamic type systems, have more
benefits than just reducing the amount of code. Rubyers (and Pythonists, etc)
know this very well.
Thomas said:One of the things that annoys me with some of the most vocal dynamic
type advocates is that they only highlight reduced code through not
declaring variable types and defining interfaces.
Dynamic typed
languages require shorted code that appears superficially easier to
understand. If you want to understand the code sufficiently to be able
to maintain it, or just write it in the first place, static typing wins
hands down (IMO).
It appears that the real big advantage of dynamic typing is that
infrastructure programmers can programmatically add boilerplate to
classes (or objects for prototype-based systems), in much the same way
as you can use APT (only very much easier).
Chris Uppal said:I think the impression conveyed by "the one advantage" is false.
Non-declarative type systems, in particular dynamic type systems, have more
benefits than just reducing the amount of code. Rubyers (and Pythonists, etc)
know this very well.
Andrew McDonagh said:Depends upon the type of documentation you want. Ruby can have JavaDoc
style docs too. Other than that, for most people, its the design
methodology you use which is the documentation, not the language you use.
RUP users would rely upon UML diagrams. TDDers would rely upon
Acceptance & Unit Tests (we consider them to be executable design docs).
As in IDEs?
No really.
The original refactoring IDE was developed for the Smalltalk language
and at that time it supported the following...
Like what?
That was my mistake. I meant to say "the one obvious advantage", but I
forgot to type that word.
Incidentally, let's be clear: although it's a common colloquiallism to
talk about "dynamically typed" languages, such languages do not have a
type system.
The standard text is Pierce, who says a type system is: "a
tractable syntactic method for proving the absence of certain program
behaviors".
Chris said:Yes. However, a good portion of the refactorings you list are
computationally intractable in Smalltalk in the general case. I am not
a Smalltalk programmer, and I don't know how the refactoring tools
handled that... perhaps they would give up, or perhaps they would guess
according to some heuristic to guess at the meaning of the code, and
rely on your unit tests to catch any errors that are introduced. Either
could be reasonable, depending on how good the heuristic can be made,
but either one is also a significant barrier to having usable tools.
So clearly, tools can be written for dynamic languages. The question is
whether they can be as good as tools for typed languages can be. (I'm
arguing the less popular side here; I would, however, probably agree if
you point out that an interactive tool that works 99.99% of the time is
just as good as one that works 100% of the time. I don't know if
Smalltalk's refactorings really do work 99.99% of the time or not.)
Like, for example, implementation of polymorphic method dispatch in
practically the same time cost as a standard procedure call by using
vtables.
Also, as an example, some of the work being done toward
optimizing away heap allocations by moving data onto the stack in Java
depends on static type analysis.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.