44)
If I think I ever understood (E)LISP, that understanding
appears to have eroded or been contaminated with other
programming languages. I expected the following to work
and it doesn't in emacs:
? (defun foo () (lambda (x) x))
> foo
? (foo)
> (lambda (x) x)
? ((lambda (x) x) 10)
> 10
? ((foo) 10)
> *error*
? (foo 10)
> *error*
I also tried this out in LispWorks
and while it lets me have the free variable x,
at least it gives me a warning! But I still haven't
figured out how to apply the lambda using foo; I
get errors in the same cases as with ELISP above.
Looking around on the net, it appears one has to use
setf and funcall? Insanity!
Now, it works just fine in SMLNJ so either (E)LISP is
from hell, or I never actually understood it.
- fun f () = fn x => x;
val f = fn : unit -> 'a -> 'a
- f ();
stdIn:10.1-10.5 Warning: type vars not generalized because of
value restriction are instantiated to dummy types (X1,X2,...)
val it = fn : ?.X1 -> ?.X1
- (fn x => x) 10;
val it = 10 : int
- (f ()) 10;
val it = 10 : int
43)
Also! This is what I expect from a language:
Standard ML of New Jersey v110.53 [built: Fri Feb 25 17:30:18 2005]
- fun f = x;
stdIn: Error: can't find function arguments in clause
stdIn: Error: unbound variable or constructor: x
Not this garbage (from Python):
Python 2.3 (#1, Aug 1 2003, 17:14:57)
[GCC 2.96 20000731 (Red Hat Linux 7.3 2.96-113)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> def foo(): return x;
...
>>>
The scary thing is that Hugs98 let me load
a file that defined a function with a free
variable, with nary a complaint! That hardly
strikes me as what Haskell is supposed to be
doing... at least when I try it in ghci:
Prelude> let foobar () = xyzpdq
<interactive>:1:16: Not in scope: `xyzpdq'
42)
More Python garbage:
> >>> x = 10;
> >>> x;
>10
> >>> def foo(): return x;
>...
> >>> foo();
>10
> >>> x = 20;
> >>> foo();
>20
Whereas trusty ghci gets it right:
Prelude> let add2 x y = x + y + z
<interactive>:1:23: Not in scope: `z'
Prelude> let z = 10
Prelude> z
10
Prelude> let add2 x y = x + y + z
Prelude> add2 1 2
13
Prelude> let z = 20
Prelude> add2 1 2
13
41)
The
K
language sounds cool, but I pretty much refuse
to use anything that
disregards standard mathematical rules
for notation and precedence.
40)
An interesting discussion telling you why,
when you reach for LISP, you should really
consider
reaching for Python instead.
39)
Scala sounds great and all, but when you start
reading the
newsgroup
you begin to see how much of a nightmare it can be
to grok. I'm scared of trying to go that route and
end up in some hell of strange differences
between mixins, traits and inheritance, and secret
rewritings going on between the scala source code
I write and the final java code
that gets executed. E.g.,
"As opposed to multiple inheritance, base
classes are inherited only once. In a mixin composition
A with B with C, class A acts as actual superclass of
mixins B and C, replacing the declared superclasses of B
and C. To maintain type soundness, A must be a subclass
of the declared superclasses of B and C. A super reference
in either B or C will refer to a member of class A. As
is the case for trait composition, Scala's mixin composition
is commutative in the mixins - A with B with C is
equivalent to A with C with B." Uh huh. Wouldn't a nice
little picture be worth a thousand words here?
38)
Fortress
looks to be nifty if only in that they want it to be writable and
readable in ASCII as well as other formats like WYSIWYG math! (See
the examples in
[pdf].)
37)
Sucks that IDEs and compilers (that I know of, at any rate)
do not warn you if you use the wrong variable from a for loop
as an array index. To wit:
for( int iDex = 0; iDex < iMax; iDex++ )
{
void* pBar = pSomeArray[iMax]; // should be [iDex].
}
36)
Nice how in C/++ you can write x=Foo(Bar) or x=(Foo)Bar and they are
very different things. Whoo, doggy. (Does LISP fare
even worse from that perspective?)
35)
Maybe I'm crazy, but I think a language should let you write
stuff in regular old text mode. Like, inside Emacs. So I think
that Squeak is a little
sad.
34)
It drives me up the wall when documentation or code browsers
do not show return values. MSDN doesn't. Visual Studio often
doesn't. Java docs? They do... sorta. The docs for a given
class do, but the index for a package hierarchy only shows
the arguments, not the return type, so that sucks!
33)
A compiler must tell you both the line number and the column
position of errors. Any less is a shooting offense, methinks. (I
should add the requirement that they match your source
code, something at which JSP fails.)
32)
Perl has this nice thing that lets you say
"if this object doesn't know how
to handle the request, send it to this other one" which
makes it easy to make a wrapper class that is sort of
like a subclass. I'm not sure how doable that is in
other languges, which is really lame! I hate writing
boilerplate wrapper code, it is a maintenance nightmare.
31)
Dumb development groups overload the use of ToString() too often.
Some folks will make it for debug purposes, then somebody
else will want to use it for writing to a database,
then somebody else will want it formatted for some
third purpose.
30)
I know there are plenty of reasons why it may never happen
in a language that I would get to use, but I wish we could
get rid of the distinction between heap/reference types and
stack/value types. Definitely intertwined is the whole issue
of how much "null" sucks.
29)
If you are going to the trouble of adding "foreach" syntactic sugar to
your C# language, why not have it check for a null list for me? I am
getting really sick and tired of having to do that everywhere
first.
28)
The whole difference between a C# method and a C# property is
really bloody annoying when it comes time to call them. How many
times have I had to fix some code I just wrote because I thought
it was the other kind of thing? Why not just make everything have
the same bloody syntax? Hate.
27)
Anybody who claims that static typing (through type inference,
of course) isn't necessary because you should catch everything
through unit tests is a dummy poop-head. Well, or they've just
never been in a situation where the unit tests take a long time
to run, time that you wouldn't have wasted if the compiler had
been smart enough to tell you ahead of time that the cast was
going to fail, ya know?
26)
I'm getting into Scala, although I haven't really grokked
everything there by lightyears. One thing that is really bugging
me already is that they use "var" and "val" as keywords for
mutable and immutable data, respectively. It is a super pet
peeve to have things which must be differentiated differ only
in one letter (another example is "get" and "set", or even
"x" and "y" coordinates). Dorks!
25)
It is probably more a suckful feature of Install Anywhere
than it is of Scala, but the installer is basically a
piece
of poo! Like, whatever important message was in there, well,
I guess I'll never know.
24)
Oh. Here I was going through the Nice tutorial, only to realize
that it is still statically typed, with no automatic type inference!
What crock, screw this, I'm outta here - time for Scala, I guess.
23)
The only way I have gotten OCaml to build on my Windows XP machine
is to do the MingW build (the CygWin one doesn't let you use shared
libraries, apparently, which means you really can't do anything useful)
and to follow the steps exactly. I was trying to leave out the "make
-f Makefile.nt opt" part, and it breaks the "make -f Makefile.nt
install" stage. D'oh! Not that there's any explanation of this anywhere
that Google can find for me. Well, it did finally install, but it is
very different from what I had via the pre-built download. Many things
are missing, so I'm not sure what the heck to do. Well, other than
completely give up on OCaml and move to Nice instead. Sheesh.
22)
Dammit! I was all ready to get into Nice, only to
find them using the totally horrible, cursed, evil,
spiteful, simply yukky C++ template syntax for abstract
types: . So ugly. Scala doesn't fare that much better,
but I do prefer [T].
21)
The problem with functional languages like Haskell
is that they start to need many, many succint representations
for ideas. To name just a few, there's ::, ->, =>, <-, and >>=.
It gets pretty crazy! But, in addition, I think some of the choices
for these symbols were not so good. I've said
it before and I'll say it again:
picking the right names or symbols is a very important
thing. It is all about cognitive dissonance and learning curves.
So, for example, I think => is a poor choice. I'd rather see
something like |, but of course that is already taken for
something else. So is ||. Do you end up with |: or |>, or what?
It is such a hairy evil mess: Dr Seuss was
prophetic.
The kicker is that if you don't know what the symbol means before
you see it, you are SOL. I have
yet to find
a
concise
table explaining them all. (The penultimate kicker here is that
I'd guess the majority of Haskell geeks would say
Perl's syntax is pure evil!)
20)
Am I really going to break down and start writing things
in Haskell? Yikes. I had my heart set on OCaml because I
wanted to write games and need some real speed for that.
But getting OCaml working on a Windows system is Hell on
Earth, so I'm moving away from it. Now I'm reading about
monads (for what must be the zillionth time, maybe I'll
actually understand them this once?) and other Haskell-ian
stuff. Check out arrows
[pdf]
as well.
19)
Nice definitely impresses me by addressing things which
irk me about languages. Things which everybody knows kinda
suck, yet nothing has been done about it. E.g.:
null
is not always something you want to allow.
18)
I haven't investigated it deeply, but I'm under the impression
that the Java license isn't all that hunky-dory. At least the .Net
stuff has been made an ECMA standard, so things like Mono can exist.
So now I'm looking to avoid Java. Maybe some day things like Nice
will be able to spit out Parrot bytecode, rather than JVM? Scala
claims to be able to run on the .Net CLR, but you have to use some
whacky J# stuff, which frankly scares me (more indirection and
libraries means the likelyhood of anything working is exponentially
worse off).
17)
I am looking at
Nice
and
Scala. It is actually an eensy
bit easier to find references to Scala with Google than
for Nice, because of the choice of name. Scala does return
lots of stuff about opera, so that does suck, but it is
nevertheless easier to find things about it - remember how
your middle school English teacher would hit you over the
head and say that "nice" is an overused word? Yeah, well,
now you see the advice really meant something.
16)
Somebody else felt the need to
put it into words
as well.
15)
A rule of thumb for you, so you can learn from my mistakes:
if the thing you want to use is not actively supported on the
system you want to use it on, and i mean actively supported
by the original makers, or some company, or something real,
or if the instructions for getting it to work include something
along the lines of "download and build these 17 other libraries/systems
first", then I suggest you run screaming the hell away. Nuke it
from orbit, it's the only way to be sure!
14)
Maybe this should also be a dead give-away to me that OCaml
isn't the way for me to be going: there doesn't appear to be
a decent way to generate 'tags' for versions 3.08 and up.
Grrrreat!
13)
Here's a funny statement regarding O'Caml's module system:
"The compiler searches the compiled interface for the module Set in a
file set.cmi, and not Set.cmi." Terrrrific!
12)
So O'Caml does all this type inference stuff... and then the
bastard still makes you write your own .mli files?! Insanity!
11)
O'Caml has really bad syntax, checking and error reporting.
In particular, it completely freaks out when you don't have your
semicolons in there correctly, and it gives you like no help
in tracking that down as the problem. Yeah, that sounds like
fun to have to deal with all the time. In things like C you don't
have to worry about an extra semicolon at the end of a line
breaking everything, pretty much, so this O'Caml problem strikes
me as really really lame. For crying out loud, I just want a functional
language that doesn't suck, why is this so hard to find?! Code example:
print_string "fred";
print_newline ()
let
baz = 10
in
print_int baz;
print_newline ();
The error you get for that is "File 'examples/foo.ml', line 6,
characters 0-2: Syntax error". Now, line 6 is just the "in" statement.
What could possibly be evil about that? The real bug is that
there's a missing ";" on line 2. That's light years away
from what is going on in line 6! The kicker is that I've (more often)
been in the situation where a ";" is throwing everything off, and
once you remove it everything is happy. So the rhyme or reason
of O'Caml is way too involved and obtuse and nutty for reasonable
use. Whatever!
10)
A great little essay:
NIL
Considered Harmful.
9)
Python uses dynamic scope. You have to go to extended
lengths (a few extra keystrokes) any time you want lexical
scoping. That is just insane. Ditto for Ruby, Perl, Lush, etc.
8)
Apparently, object methods in Python require that you
explicitly include "self" in the parameter list. How
retarded is that?
7)
Perl 5's OO style is so disturbingly lame. Sure, it
can do it, but it is really far removed from any
concept of cleanliness.
6)
What kind of complete and utter freak makes
a programming language that
requires all upper-case
words in the syntax?
5)
REBOL sounds
interesting enough, but it pisses me off that the
author came up with some shorthand
syntax that seems just plain wrong to me. That,
and the order of arguments to simple functions. To
wit, "modified? file" doesn't return a boolean,
it returns a timestamp. Yet "dir? file" returns
a boolean. Augh! Or, the "find" command takes
the search space first, and the thing to look
for second. That is just utterly backward to
how anybody would say what to do. You
say "find X in XYZ," right? Right?! Whatever!
Sure, on the one hand this is minor stuff, but actually
no it isn't, because it causes cognitive dissonance
which gets in the way of using the language. It
is just plain wrong. You lose.
4)
Languages should have de/serialization from the get-go!
3)
Clean
sounds neat, however:
- Could you pick a more stupid name for being
able to do web searches? "Klean" would have
been a hell of a lot better. Baka!
- Apparently, while it can deduce the type signature
of a function, it doesn't have a means of inserting that
into your source file. So you never see anything telling
you what the types are. (I think O'Caml has the same problem; anything
that is run through a compiler rather than an interpreter
has this problem, unless given a tool to reinsert the types.)
- Their IDE seems to just make it that much more difficult
to get a program running. And the things which make an IDE
actually useful don't exist in theirs: in particular, making
error messages live, hooked up to explanations of what they
mean, how they were caused, and what to do to fix them.
Whatever. Oh, and the error window spits out stuff
that are actually status messages, which is really confusing
to a newbie - I thought my stuff wasn't building because it
kept saying "no abc file" when in fact that is expected,
it is like saying "no .o file." Hate.
- It forces me to use their asinine IDE. I want to use Emacs, okay?
And, if I can't use Emacs, then at least get the keybindings
right - on Windows, Ctrl + right arrow should move you ahead one
word, not put you at the end of the line. Give. Me. Strength.
Oh, and just because I can manually remap keys and commands doesn't
mean it is like having Emacs. Even if I took the time to remap things,
which would obviously suck ass to have to do, you're left with a Yugo
pretending to be a Porche; just because it has gas and brake pedals
doesn't at all mean they are the same thing. Note further that
since they are rolling their own IDE, you don't get any advanced
features like "find the original definition of this symbol" that
you might get from e.g.: Visual Studio. I realize VS isn't a
cross-platform tool, but seems like maybe they could have wedged
themselves in with Emacs and Tags or something? Just seems like
reinventing the wheel of IDE-ness sucks until you've got a pretty
advanced thing, because other ones are already so much better.
Perhaps trying to 'integrate' Clean into Emacs would suck more than
I can possibly imagine... And don't get me started on the windowing
system in the IDE, bloody crap it is!
- There are extra libraries (Object IO, Dynamics) but they are
only available for Windows, and there is no remark about when, if ever,
they might be available for other OSs. So that sucks!
- I'm really sad that Clean's module system basically requires
both .h and .c files, to use a C analogy. I think Java and C#
both show that you can nuke .h files and still be happy. In fact,
I think everybody is a lot happier without .h files.
- Clean uses infixr, infixl and infix.
Great, yeah, those will be really easy to distinguish
on the page since they differ by a single letter. I hate that.
- Here's something that took me a while to find out: "import StdEnv"
is really good, much better than manually trying to import
every module separately to fix each compiler error, ha ha.