LISPers

Pages: 12
I think C is better. C is simple - it has a small standard library and a small number of keywords and operators - but it's not easy - mostly because of manual memory management - which makes it ideal for showing who should and shouldn't be learning to program. Pointers are really the only problem because I know from experience that they can be very hard to grasp. C++ is a no-go because on top of pointers it has more complex syntax, references, classes, templates, and everything else. Other than pointers, the only thing that needs avoiding is the preprocessor. As long as it's explained when to use it and when not to use it, it should be fine.

Python is easy to start learning, but it doesn't so much have a library of features as a pile of them. It's like they just grabbed a box labelled "features" and tipped it upside down into a box labelled "Python keywords". As scripting languages go, I think Javascript is better (or would be, if there were implementations other than web browsers and Node.js; Javascript would be perfect if it could run on the .Net framework (properly)). The standard library is usually cited as a reason to use Python, but it's really not that good. The .Net framework is far more consistent and more complete, and when you can't find something or you need your code to run fast, it's as simple as getting the C library and doing this:
1
2
3
4
5
class MyCLibrary {
        [DllImport("MyCLibrary.dll", EntryPoint="MyCFunction")]
        private static extern void MyCFunction();
        // Repeat for every symbol you need to access.
}

You don't have to do anything different in the C code. It's a bit more complicated in Python.

C# is also a more elegant language. I dislike Python's class system as compared to C#'s or C++'s.
Last edited on
C++ is a no-go because on top of pointers it has more complex syntax, references, classes, templates, and everything else.


I don't understand why people say this...just because it has features doesn't mean you teach them immediately. I don't see anyone complaining about the fact that you have to explain away casting for malloc calls, or passing function pointers to qsort.
What is C but C++ without classes, references, templates, etc.?

Passing function pointers to qsort is a good point, but you don't usually cast the return value of malloc and friends in C, that's mostly a C++ thing (explicitly casting void pointers, that is). I see what you mean - just because something is there, doesn't mean it has to be used, but if you remove the extra language features that C++ provides, it's just C. That is, after all, why it's called C++.
I think every programmer should learn a functional language.

If you've only used Von Neumann languages, the paradigm shift will do you a world of good.
Emacs lisp is still quite popular, and I don't see it going away for a while. I won't say it doesn't have its faults, but it's quite popular and easy to learn (plus there is tons of sample code of it available online).
Last edited on
I vowed to myself that I would learn Clojure this summer :)
A less positional programming language
http://www.csse.monash.edu.au/~damian/papers/HTML/Perligata.html

smalltalk only have 6 reserved words: true, false, nil, self, super, and thisContext
and everything is an object, that would be great to teach.
¿Anyone tried APL?

¿What's the big deal with pointers?
I want to learn APL. I just haven't taken the time to do it yet.

kbw + 1

chrisname
You should take a look at Tcl. Your ideal language isn't that far off. (If you wanted, you could make it actually look like your ideal language.)
Anyone tried APL

I have. As a language on its own right it's far from perfect (especially if you've touched J), but the community around the language is jaw-dropping incredible. Just talking to senior APL developers who were interviewing me made me feel like I gained IQ points. Generalized outer products are the letters of the language they speak. Even when doing something seemingly non-mathematical, like GUI programming, they toss around matrices of open windows.

Trivia: which function in the C++ standard library is named after an APL primitive?
@Duoas,
You really do like Tcl, don't you? Thanks, I'll put it on my list of languages to check out (also, I'll make a list of languages to check out).
Topic archived. No new replies allowed.
Pages: 12