What to learn? Lisp or OCaml or…? [closed]

Neither Lisp nor OCaml is super far afield from what you already know. Here are four suggestions chosen partly for intrinsic interest and partly to stretch your horizons. A logic programming language, probably Prolog. I haven’t found good materials online, but the book The Art of Prolog by Sterling and Shapiro is excellent. The more … Read more

Suggestions on syntax to express mathematical formula concisely

If you’re going to be writing this for the ab-initio world (which I’m guessing from your MP2 equation) you want to make it very easy and clear to express things as close to the mathematical definition that you can. For one, I wouldn’t have the complicated range function. Have it define a loop, but if … Read more

Why do we need an embeddable programming language like Lua?

Since you tagged the question as “Lua”, I’ll give you an answer in the context of this language. Introduction Lua is written in C (almost completely compatible with C89 standard; the incompatible features can be easily disabled, if needed, using compile-time switches) and has been designed to be easily integrated with C code. In the … Read more

What does “powerful” mean, when discussing programming languages?

It does not have a well-defined meaning. In these types of discussions, “language X is more powerful than language Y” usually means little more than “I like language X more than language Y.” On the other end of the spectrum, you’ll also usually have someone chime in about how any Turing-complete language can accomplish the … Read more

Functional Programming in C# vs LISP [closed]

Doing functional programming in C# is technically possible (well, any language that has function pointers or delegates equivalent can be “functional”) — but C# gets very very painful if you try to do much. Off the top of my head, in no particular order: Type inference Only exists for locals now Should apply to pretty … Read more

What’s so great about Scala? [closed]

Here are some of the things that made me favour Scala (over, say, usual Java): a) Type inference. The Java way of doing it: Map<Something, List<SomethingElse>> list = new HashMap<Something, List<SomethingElse>>() .. is rather verbose compared to Scala. The compiler should be able to figure it out if you give one of these lists. b) … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)