Post #66,921
12/5/02 1:42:49 PM
|
Re: I had a "discussion" with a C++ programmer
This thing appears so many places on the web that its a cliche - yet it remains very apt.
[link|http://www.harshman.com/archives/apes.html|http://www.harshman....rchives/apes.html]
Its funny - I got hammered at my San Diego job interview by a comp sci guy with good street cred (phd with decent papers - computational linguist and ai) because I ventured that Java was a productivity killer.
He got nasty and said - "Look, James Gosling and friends are not bozos, they are not rubes, they know lisp, smalltalk, objective c, C++ and some other languages - why do you suppose they selected the feature set they did for Java?"
I ventured that 1) they don't really know all those languages - not from the standpoint of working daily in them - acquainted sure - know - nope. 2) Language design is an art involving many factors - including taste - apparently they're short on that and 3) I think they were trying to capture the folks C++ orphaned and thus had to make it appeal to people who like crappy languages.
Apparently he remains unconvinced cause I didn't get the gig. I probably blew the job on this point alone - but then I want to work with really good people and this guy was newly converted to the Java way (after being burned on a TCL oriented project that was a little too unstructured for its own good).
Its downright frustrating - we're never going to get off of Gilligan's island.
I am out of the country for the duration of the Bush administration. Please leave a message and I'll get back to you when democracy returns.
|
Post #67,462
12/9/02 9:40:00 AM
|
Re: I had a "discussion" with a C++ programmer
He got nasty and said - "Look, James Gosling and friends are not bozos, they are not rubes, they know lisp, smalltalk, objective c, C++ and some other languages - why do you suppose they selected the feature set they did for Java?" I think it's because Oak had a very small implementation budget. It was an experimental set-top box language. From that perspective, Java is a great language design, considered from the perspective of, "How can we get as much benefit from modern language design, given that we have this teeny-tiny budget?" So, look at all the things they did: -> No first-class functions, because that complicates the type system. -> No parametric types, because that complicates the type system. -> No clever object layout strategies. -> Whenever this caused a potential performance problem, they added a hack to fix just that problem, rather than solving the general problem. For example, consider string concatentation in Java, which implicitly creates StringBuffers, and also think about the primitive type/object distinction. -> They fixed bad intuitions with runtime checks: for example, Java arrays are covariant, rather than invariant. The unsoundness is fixed with a runtime typecheck on every access, rather than properly engineering the type system. Java probably does as well as can be expected given the amount of design effort put into it, but there are plenty of much better-engineered languages. (In fact, I'm creating one.)
|
Post #67,635
12/9/02 5:34:17 PM
|
Roll your own...
You wouldn't by chance be working on [link|http://neelk.dyndns.org:8080/needle/mit-needle-talk.pdf|Needle] would you? :-)
|
Post #67,658
12/9/02 6:55:04 PM
|
Interesting summary
Looked interesting but I don't have time to consider it closely. Randomly noticed that you need to correct the spelling of Once from p28 to 30...
Cheers, Ben
"Career politicians are inherently untrustworthy; if it spends its life buzzing around the outhouse, it\ufffds probably a fly." - [link|http://www.nationalinterest.org/issues/58/Mead.html|Walter Mead]
|
Post #67,763
12/10/02 8:34:03 AM
|
Needle...
...is indeed what I am working on. :)
Not yet ready for prime time, but I think I've got something that will be moby fun to hack with when it is.
|
Post #67,841
12/10/02 1:22:39 PM
|
What is the underlying motivation?
Why do it? What problem is it intended to address? IOW, what is the central point? Thanks.
I am out of the country for the duration of the Bush administration. Please leave a message and I'll get back to you when democracy returns.
|
Post #67,891
12/10/02 4:46:58 PM
|
Re: What is the underlying motivation?
There are a couple. First of all, I wanted to write a language to use as part of my "portfolio" to get into grad school.
Since I didn't want to waste my time on building yet another toy language, I thought about what I really wanted from a programming language, and deciding to actually implement it. I do a lot of exploratory programming, and it's my experience that I need three key features to go as fast as possible.
1. I wanted support for functional programming. Higher-order functions (blocks to a Smalltalker) are an essential tool for avoiding code duplication, because they let you abstract common patterns of execution. They also let you reduce the size of your program's class hierarchy, because you can use first-class functions to parameterize behaviors. Both of these make programs more compact, and hence easier to understand and modify.
2. I wanted support for OO-style subclassing. When doing exploratory programming, I want to be able to extend existing datatypes as needed. In a functional language like Haskell or ML, this isn't possible -- one must edit the original datatype declaration and all of the code that uses it. This kind of sucks.
3. I wanted a generic function/multimethod based OO system. This solves the binary method problem completely, and makes extending existing classes with new behavior very easy. The Visitor pattern just vanishes, for example. Furthermore, being able to extend existing classes in a disciplined way lets you avoid adding useless subclasses to your system, and making messages first-class function values lets you integrate OO and FP easily. This makes programs smaller and easier to modify, again.
4. I wanted static typing with type inference. IMO, type inference is one of the most amazing technlogies out there. You get all of the benefits of static type-checking with almost none of the costs, with the additional benefit that when you are doing experimental programming you can use type errors as a tool to help figure out what the structure of your program should be.
I've used languages like Dylan, which support everything I want but #4, and languages like Ocaml, which give me everything but #3. In each case I found myself missing either generic functions or static type inference.
Finally, I wanted to write a language that would let me replace Python as my tool of choice for quick hacks. For example, I like Ocaml more than I like Python, but I turn instinctivly to Python for quick hacks because Python has a very clean set of libraries, and Ocaml has a rather irregular and quirky set of libraries. I want to write a FPL that took its direction from the practicality and pragmatism of the scripting languages -- I'd like to help bring the sheer speed and fun of statically typed OO languages to the scripting world.
|
Post #67,948
12/10/02 8:47:27 PM
|
Suggestion...
Look at [link|http://www.rubycentral.com/book/builtins.html|http://www.rubycentr...ook/builtins.html] closely. This is Ruby's libraries, which seem to do a very good job of abstracting a lot of what is good about a scripting language into a fairly cleanly designed library. Essentially, "Perl as a class library." You might get some useful ideas from browing that.
The most major thing that I think is wrong in the class structure is that it would have been nice if it was designed with something like [link|http://artengine.ca/matju/MetaRuby/|http://artengine.ca/matju/MetaRuby/] in mind from the start. What that is is a series of mixins whose purpose is to make it easy to implement a new data type which happens to resemble one of the basic built-in ones. (Think Perl's tie - only it falls out of the design of the language...)
Cheers, Ben
"Career politicians are inherently untrustworthy; if it spends its life buzzing around the outhouse, it\ufffds probably a fly." - [link|http://www.nationalinterest.org/issues/58/Mead.html|Walter Mead]
|
Post #68,054
12/11/02 3:18:27 AM
|
Have fun
"I'd like to help bring the sheer speed and fun of statically typed OO languages to the scripting world."
Hmmmm. Clearly fun is in the eye of the beholder - I'm not fond of static typing at all. For instance I think its a bit weird that in this day and age the developer at the application level (programming to the metal is something else) is required to note implementatin details of whether a number is an integer or floating point.
IOW, Numbers should all work together to appear to be a seamless continuum. Sadly, this is one of those things that has become the box that people don't seem to be able to think outside of.
x = 5 // so its an int x = 3.4 // its a double x = 23984289827394828398792837598475928739847298374928374 // its a LargeInt
Every time I read the preamble to some new language and it starts out with differentiating short and long integers - I tend to dismiss it as yet me too language by another stone aged thinker.
I am out of the country for the duration of the Bush administration. Please leave a message and I'll get back to you when democracy returns.
|
Post #68,078
12/11/02 9:41:19 AM
|
Re: Have fun
Hmmmm. Clearly fun is in the eye of the beholder - I'm not fond of static typing at all. For instance I think its a bit weird that in this day and age the developer at the application level (programming to the metal is something else) is required to note implementatin details of whether a number is an integer or floating point. In statically typed functional languages like Haskell and Ocaml, there are no type declarations. It's the compiler's job to infer the necessary type annotations, and to warn the user if there are any inconsistencies. So you get most of the flexibility and ease of use of a dynamically-typed language, plus the sanity-checking of type declarations of a static language. Type inference also enables a new style of programming, in which you write some code, and then run the compiler to figure out what the type of a subexpression should be in order for the program to be consistent. I find this to be very addictive.
|
Post #68,084
12/11/02 9:52:02 AM
12/11/02 9:55:29 AM
|
Sounds cool - compare it to Strongtalk?
[link|http://www.cs.ucsb.edu/projects/strongtalk|http://www.cs.ucsb.e...ojects/strongtalk]
I am out of the country for the duration of the Bush administration. Please leave a message and I'll get back to you when democracy returns.
|