Bruce Eckel gives his take on C++ Templates vs. Java Generics, using the example of an apply() function that will apply any method to every object in a sequence:
What I found in modifying this example and translating it to Java was surprising. As far as generics go, it does in fact support my thesis that erasure emasculates generics. What is surprising is that ... the Java code is small and elegant, and far less verbose than the C++ code,... Alas, generics had nothing to do with this succinctness – it was actually reflection and varargs that were responsible. And so the power of reflection continues to be one of the most interesting features of Java, even though its runtime uncertainty is at odds with the Java Generics goal of eliminating ClassCastExceptions.I figure the goal is for the compiler to proof the type correctness, but he's right in that RTTI is at odd with that goal.
(Also of interest, is the link to the Java Generics FAQ).
[Edit Note: The URLs should be working again]
Sun announced the release of the Java 2 Platform Standard Edition 5.0.
Most of the new features that are interesting from a language design perspective were discussed here in the past. These include generics, autoboxing/unboxing, metadata and typesafe enums. We also discussed some of the new libraries and APIs.
I can understand how Gosling is feeling right now: I wouldn't feel comfortable being responsible for a language without generics...
Jack Shirazi posted this somewhat amusing discussion.
"I guess we just move in very different circles.". Bingo... the people you know and trust think Java is 'cool,' whereas the people I know and trust think its 'uncool.' Therefore, I see people leaving in droves, whereas you see people coming. So the question boils down to, which group is more reliable in making that judgement? Probably neither... but I'm still going to rant a bit more.
I guess this is related to Graham's Hackers meme. It was almost impossible to argue against Java a couple of years ago, now it is 'officially' uncool...
Which goes to show you that language coolness is much more about community and buzzwords than it is about real language features, right?
Mind as well complete the daily trifecta and post the article on Programming Language Popularity. The author combines search, advertizing and job data to try and draw a measurement on various aspects of popularity. Open to criticism, but the results are somewhat non-surprising given the weights applied, and coming up with a truly objective measurement is probably impossible.
Probably goes against Dijkstra's advice of modeling real world objects, but Luca Cardelli is exploring Programming Languages for Biology.
In this clip from an IT Conversations interview Jon Udell tries to explain what dynamic languages are.
I think this clip makes it clear that (a) the situation as regards the terminology used to describe type system issues is beyond hope and (b) the issues Jon tries to deal with are quite real.
As we noted many times in the past, "strong" typing is not the same as "explicit typing" and most of the goals Jon talks about are achievable with statically typed languages.
In fact, dynamic - or scripting - languages encourage a development process in which programs are modified and translated iteratively, so having the compiler check the "morphed" data structures and infer their type shouldn't really be a problem, and in fact can help the developer. Naturally, since not all the code is changed at once a language that would appeal to Jon would allow the programmer to restrict the scope of type checking to specific parts of the program (e.g., only routines that may in fact be invoked).
Whatever your opinions regrading typing, I think it is very clear that we should move the debate away from having Pscal and Java as the only examples of strong typing, and C as the only example of weak typing. I hope LtU would set a good example for the rest of the community...
The Schematics Scheme Cookbook is a collaborative effort to produce practical documentation for using the Scheme language, particularly in commercial environments. It is focused on PLT Scheme, although other Scheme dialects are supported as far as possible.
A nice attempt by several of lambda's friends to provide practical help for people trying to solve real problems using Scheme.
I think the community around any non-mainstream language must encourage and support such efforts for the language to have any chance of gaining momentum.
This is somewhat related to our discussion of real life programming using Haskell, and about the success of so-called scripting languages.
I must admit that I use Python for my scripting work. Tried to use Scheme but it was too much of a bother. Guess it's time to try again.
The SRFI 40 document (now in "final" status) includes a very nice discussion of streams, especially as regards implementing them in strict languages (i.e, "even" vs. "odd" streams).
The code is in Scheme, of course, this being an SRFI, but basic knowledge of Scheme should be enough in order to read the highly readable SRFI document. Do check it out if you are interested in streams.
Jayadev Misra's tribute to EWD at Europar-2003.
A short essay that may be relevant to the question whether language designers should make their languages more forgiving as regards programmer errors, or more stringent.
Hunter-gatherers from the Piraha tribe, whose language only contains words for the numbers one and two, were unable to reliably tell the difference between four objects placed in a row and five in the same configuration, revealed the study.
A new study may provide the strongest support yet for the controversial hypothesis that the language available to humans defines our thoughts.
The result is controversial enough that I withhold judgement until I read the journal paper.
Active forum topics
New forum topics