|
 |
>> written in an OO language can create variables, read/write them, take
>> conditional branches (if/then/else, for, while, etc.) and invoke
>> methods. (Object creation can be regarded as a special case of a
>> method call. Indeed, in some languages it *is* a method call.)
>
> And in Smalltalk, conditional branches are also method calls.
Oh yeah - I'd forgotten about that...
Looping too. ;-)
>> Other languages have records. A few other languages have true
>> enumerations. But Haskell has ADTs, which are a weird hybrid of the
>> two. The only other langruage I can think of that approaches this is C
>> with its "union" construct.
>
> Ada and Hermes and heh.
Not things I'm familiar with.
It did seem for a while that every single language I leaned was just new
syntax for basically the same stuff. Every language has named functions
or procedures or subroutines or whatever you want to call them. Every
language has if/then/else, while, for, etc. Every language has local and
global variables. So it's just a question of what the syntax looks like,
and what "features" the language has. (E.g., in Pascal, you can only
loop over numbers, while C lets you write for-loops which don't even
*have* an index variable.)
And then I learned Haskel, which is *completely different*. ;-)
> Heck even Visual Basic has such as "variant" type.
Is VB statically-typed yet?
> I think Pascal has the same thing too.
Not any dialect I've seen.
> That's pretty cool, tho. I love languages where a very simple idea is
> taken to extremes.
Yeah, it's nice. Haskell is a graph-rewrite system. I mean, if you want
any kind of performance, you'll want to hack the basic model a little to
take advantage of the native machine capabilities. But basically, it's a
G-maching. (In the case of GHC, a spineless, tagless G-machine...)
Smalltalk has a nice idea: Absolutely everything is an object. Including
the entire fricking IDE. Shame about the performance though, eh?
(Actually, the most annoying thing is the lack of static typing.)
Lisp has a nice idea: Everything is a tree. Shame the underlying simple
idea had to be implemented in such an over-complicated and arbitrary way.
Although, arguably Haskell has just *so much* syntax sugar it's hard to
see the simple structure underneith. Hence this post. ;-)
Post a reply to this message
|
 |