Jump to content




which programming language's syntax do you like the best?


146 replies to this topic

#141 awsmazinggenius

  • Members
  • 930 posts
  • LocationCanada

Posted 15 May 2014 - 03:21 AM

Actually, yeah, it's exactly like that, down to that very for loop. They say something like "Liquid (the name of their "language") is a simple, beautiful way of creating great customer experiences." That is the last thing I would say about it. Super ugly. I'd much prefer to just use static HTMl pages.

#142 0099

  • Members
  • 52 posts

Posted 29 May 2014 - 04:59 PM

IMO, Lua is the most universal language ever! I can do literally anything with it. Two simple rules:
1. Always divide your task into several functions.
2. If you begin thinking that your task is impossible in Lua, try to divide it into functions even more!

For some very fast things I can use C (not C++, because I hate it) to write some functions and control that functions from Lua. Or I can implement some Lua features (like that genius 'and' and 'or' logic) in C.

Also, sometimes (but just sometimes) I use Lua object-orientiered features to structurise the things even more. I don't like other OOP languages, because of their weird and complicated syntax. If I need objects, I implement it myself.

#143 Gumball

  • Members
  • 254 posts
  • LocationFairbanks, Alaska

Posted 23 November 2014 - 04:39 AM

View PostMendax, on 08 March 2013 - 06:41 AM, said:

I'm going to say the neutral thing and go with Python.
I don't like Objective-C (especially), or Java, or C#.
def pythonIsAwesome():
if pythonIsAwesome == true:
  print "Python is awesome!"

No end statement! :D

How about.......

def checkPythonPrestige():
      if(prestigeLevel == "So awesome you can't put it in numbers"):
            a = raw_input("Do you agree? [Y/N]")
            if(a == "Y" or "y"):
                  print("I agree! :D/>")

            elif(a == "N" or "n"):
                  print("I wish you had the same opinion as me D:")

            else:

                  print("I don't know what awnser that even is.")

checkPythonPrestige()

:D

That was off the top of my head :)

#144 Alice

  • Members
  • 429 posts
  • LocationBehind you.

Posted 09 December 2014 - 01:24 AM

Did someone say no end statements?
As it just so happens, I was bored and wrote a Lua 5.2 custom compiler (Sorry, 5.1 fangirls) which allows for code like:
Code from screen.lua


soooo, yeah. That's Alissa's Lua.
Also, I know that 'else' tags do need a { and }, will fix eventually.

#145 ElvishJerricco

  • Members
  • 803 posts

Posted 10 December 2014 - 02:19 AM

View PostAlice, on 09 December 2014 - 01:24 AM, said:

Did someone say no end statements?
As it just so happens, I was bored and wrote a Lua 5.2 custom compiler (Sorry, 5.1 fangirls) which allows for code like:
Code from screen.lua


soooo, yeah. That's Alissa's Lua.
Also, I know that 'else' tags do need a { and }, will fix eventually.

I tried to add this to LuaLua. There's actually a functional reason you can't do this. Take the following snippet of code that is valid in vanilla Lua.

for w in someFunction { a = 1 } do
    -- ...
end

If we retabbed it to look like this, you might think it looks like it's using brackets for "do...end", and that the following "do...end" is just a normal chunk.

for w in someFunction {
    a = 1
}
do
    -- ...
end

So you see why you just can't use brackets in a lot of Lua statements. The fact that brackets can be table constructors, and the fact that functions can be called with table constructors instead of parentheses make it so that this much desired feature can't be implemented.

#146 LtKillPuppy

  • Members
  • 13 posts

Posted 10 December 2014 - 08:04 AM

I've always been a Python person. Though, ironically, I rarely actually write entire projects in Python. Mostly, it's replaced Perl as my go-to language to get things done in a quick fast manner.

Behind Python is C#. It's like Java but with all the annoyances mostly removed or minimized. I've written a lot of projects in C# and I've been quite happy with the language overall, plus it's built-in array of types, data containers, etc.

Lua has really grown on me in the last few years. I always thought it was a really thread-bare language with few features, but I've grown to appreciate its simplistic styling and the subtleties within it. It's also super-easy to bolt onto an existing project, which is something I can't say for Python and it's CPython interface. Ugh.

#147 SquidDev

    Frickin' laser beams | Resident Necromancer

  • Members
  • 1,427 posts
  • LocationDoes anyone put something serious here?

Posted 10 December 2014 - 04:12 PM

Mmm, Perl, I've had to write it in the past and I can do it, I just hate every minute of it:

Quote

Put a thousand million monkeys in front of a thousand million keyboards and eventually one will write a valid Java program. The rest will all write Perl programs

Got to agree with the rest. I love Python for its extensibility but it runs like a snail. C# I use for almost everything now, there are even ways to use it as a scripting language which is really useful.

I kinda like Lua now, it has its quirks (why do I have to type local? or end?) but it has grown on me. I would never use it for anything non-esoteric though. Lisp is funny, I love the ideas behind it, mostly the idea of macros. I think D implements this very cleverly as well, the idea of running code when you compile to save yourself effort later on.

Edited by SquidDev, 10 December 2014 - 04:12 PM.






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users