Author Topic: New language  (Read 42882 times)

Xecutor

  • 7DRL Reviewer
  • Rogueliker
  • *
  • Posts: 263
  • Karma: +0/-0
    • View Profile
Re: New language
« Reply #45 on: June 11, 2013, 10:43:06 AM »
You can literally write blocks of and get C code performance if you need it via FFI. This includes arrays. It's even easier to use than Python's C interface.
There is FFI module for python too, btw.

Krice

  • (Banned)
  • Rogueliker
  • ***
  • Posts: 2316
  • Karma: +0/-2
    • View Profile
    • Email
Re: New language
« Reply #46 on: June 11, 2013, 12:06:05 PM »
We are too smart to turn this into a language war.

I think my problems are elsewhere than in choice of language. Just generic lack of motivation..

eclectocrat

  • Rogueliker
  • ***
  • Posts: 81
  • Karma: +0/-0
  • Most of your personality is unconscious.
    • View Profile
    • Mysterious Castle
    • Email
Re: New language
« Reply #47 on: June 11, 2013, 01:38:34 PM »
No war intended, just combatting mistaken perceptions/loose language.

@Xecutor, I can't fault you for your taste in language, to each their own, but I think you are being a bit hyperbolic in your description of Lua. It's no big deal, but I don't want a newbie who is on the fence to get the wrong impression. I'd always recommend Python over Lua when putting together a desktop application or patching utilities together, and recommend Lua in the one place where it has clear and unambiguous advantages (embedding into engines).

PS. Embedding Python is really a non starter (as of 11 months ago, have not updated my knowledge since). I had to abandon a good Python codebase 3 years ago because my ambitions to port to various mobile systems hit a complexity wall. Maybe things are better now.

@OP: That said, learn JavaScript, so you can come to first hand grips with terrible design decisions and appreciate languages like Python and Lua more :)

Xecutor

  • 7DRL Reviewer
  • Rogueliker
  • *
  • Posts: 263
  • Karma: +0/-0
    • View Profile
Re: New language
« Reply #48 on: June 11, 2013, 02:42:56 PM »
and recommend Lua in the one place where it has clear and unambiguous advantages (embedding into engines).
That's what I wrote somewhere above. Lua is good as a sidekick.
But nowadays people are trying to write complete applications in Lua.
Which is IMO wrong.

There are several 7drls this year written in python and lua.
While reading python sources was easy, trying to understand what is going
on in more or less big lua codebase is non trivial.
And total length of 'local' keywords in pro lua code is sometimes longer than the rest of the code.

joeclark77

  • Rogueliker
  • ***
  • Posts: 90
  • Karma: +0/-0
    • View Profile
Re: New language
« Reply #49 on: June 19, 2013, 03:59:51 PM »
I will second Python.  It's very easy to learn, quick to code, and has some interesting differences from other languages.  I like that it requires precision but without a lot of extraneous typing (for example, the indentation of loops and other code blocks must be consistent, but you don't need lots of "{}" symbols that you'll lose track of).

If compilation errors due to mismatched braces are your biggest problem, then of course, languages that don't have braces are an obvious choice.

What I meant was, I like that a language is designed to force you to be precise.  As in, there's almost always one best way to do something.  (I am the exact opposite of whoever Perl was designed for.)  But the way that other languages accomplish precision is to be extremely wordy (like Java) and/or clutter up your code with lots of brackets, parentheses, semicolons, etc.  Python manages to be a precise language but is also very easy to write and easy to read.