[POLL] Do you like "then,do,end" or "{ }"?
[POLL] Do you like "then,do,end" or "{ }"?
I immediately noticed Lua has then,do,and end instead of curly braces. I want to know what others think of this. Vote nao plz.
I like to draw and program
- slime
- Solid Snayke
- Posts: 3162
- Joined: Mon Aug 23, 2010 6:45 am
- Location: Nova Scotia, Canada
- Contact:
Re: [POLL] Do you like "then,do,end" or "{ }"?
They're both fine. As are other alternatives.
Lua is built around using words for code blocks, some other languages use braces or whitespace+newlines or parentheses.
Squirrel is a language which takes heavy influence from Lua but uses braces for code blocks.
Lua is built around using words for code blocks, some other languages use braces or whitespace+newlines or parentheses.
Squirrel is a language which takes heavy influence from Lua but uses braces for code blocks.
Re: [POLL] Do you like "then,do,end" or "{ }"?
Oh yea, I forgot about Squirrel.slime wrote:Squirrel is a language which takes heavy influence from Lua but uses braces for code blocks.
Does Squirrel have a graphics/game library? If so can u link it.
I like to draw and program
Re: [POLL] Do you like "then,do,end" or "{ }"?
The problem with including {} is that you probably also need to include () in a lot of places to make your code clear and I'm not sure it'd become more readable.
If find Lua to be far easier on the eyes than Javascript and the two are quite alike in how they work, but the syntax is different. And Javascript usually turns into a mess of (}{}(()][]) at some point in development.
If find Lua to be far easier on the eyes than Javascript and the two are quite alike in how they work, but the syntax is different. And Javascript usually turns into a mess of (}{}(()][]) at some point in development.
Re: [POLL] Do you like "then,do,end" or "{ }"?
I don't mind using {}. But then/do/end, seem to make the code look cleaner.
PM me on here or elsewhere if you'd like to discuss porting your game to Nintendo Switch via mazette!
personal page and a raycaster
personal page and a raycaster
Re: [POLL] Do you like "then,do,end" or "{ }"?
I'm fine with either. If I have an editor that indicates indentation level it doesn't really matter which one is used (provided the indentation is consistent).
- Jasoco
- Inner party member
- Posts: 3726
- Joined: Mon Jun 22, 2009 9:35 am
- Location: Pennsylvania, USA
- Contact:
Re: [POLL] Do you like "then,do,end" or "{ }"?
I think If/Then/Do/End works well for Lua. Curly Braces wouldn't work well with Lua and its Table structure and would just be confusing. Since Functions and Tables would look so similar to each other.
Re: [POLL] Do you like "then,do,end" or "{ }"?
Javascript always seems to turn into a mess of brackets lol, but it wouldn't be fixed by using "then/do/end", it would then just be a mess of "then/do/end" really. Most languages don't seem to go nuts with brackets, so most of the time I do prefer using them simply because of habit, not because they look ugly or anything.Plu wrote:The problem with including {} is that you probably also need to include () in a lot of places to make your code clear and I'm not sure it'd become more readable.
If find Lua to be far easier on the eyes than Javascript and the two are quite alike in how they work, but the syntax is different. And Javascript usually turns into a mess of (}{}(()][]) at some point in development.
Re: [POLL] Do you like "then,do,end" or "{ }"?
To be perfectly honest, I'd much prefer Python syntax in general. Having to type end or } feels like I'm back in either ancient Pascal or K&R C days. Lua has many advantages, but I'd just about give them all up if there was a Python version of Love. Really miss the conciseness and power as well as the 'batteries included'.
Lua lou aye, ah no its, lua louie
Re: [POLL] Do you like "then,do,end" or "{ }"?
I love the {} more than the other option. Then it'd be Python, and then Lua's syntax.
Javascript does tend to get messy.
That being said I do like do/then/end/etc. If I had to choose between one of them though, I'm a curly brace guy all the way! Maybe that's because my first language I got somewhere with was Javascript. I did try Python, but I was too N00B to find a good tutorial, and found a crap one on the internet somewhere that didn't make any sense. Looking back at that tutorial, it was a terrible tutorial. Javascript was the first language I actually got far with.
I'm also not saying I prefer a language based on what way it defines where a block of code begins and ends. I prefer a language on what's possible with it and what I want to use the language for. I tend to dislike Python because it's not that fast, and with some small Tkinter apps you can defiantly notice it. I also dislike Python because there is a lack of game libraries for it(PyGame sucks, PyGlet is good, but Cocos2d is recommended for game development. Cocos2d isn't well documented and hasn't got a big community). Lua is simple, easy to learn, powerful, and has a game framework: LÖVE! The framework is well documented, has a good sized community behind it and plenty of people are willing to help, and 99% of them are awesome people! I don't like Ruby because it's kinda slow, it does things in a strange way, and has some badly documented game frameworks. Rubygame is dead. Gosu is badly documented. Chingu hasn't got good docs either. Ruby and it's libraries don't have good communities -- if any at all! Java is great for games. There are 3 main frameworks, all of them are well documented and Java has a HUGE community behind it. All 3 have good communities. Java has great syntax and is really simple to learn.
Just my opinion on the topic
EDIT:
EDIT 2:
Squirrel has a game library of sorts. It's not for the Desktop, but it's for iOS and Android. I've never used it. I do know Squirrel, but I prefer LibGDX for Android and iOS development because I like Java. Check out the emo game framework. It's free, open source and seems to be pretty good. Of course, you could always use Corona. One thing about the emo-framework is that it has no "pro" version. You don't pay for more features. Of course, you can donate, but AFAIK it doesn't give you any perks.
Javascript does tend to get messy.
That being said I do like do/then/end/etc. If I had to choose between one of them though, I'm a curly brace guy all the way! Maybe that's because my first language I got somewhere with was Javascript. I did try Python, but I was too N00B to find a good tutorial, and found a crap one on the internet somewhere that didn't make any sense. Looking back at that tutorial, it was a terrible tutorial. Javascript was the first language I actually got far with.
I'm also not saying I prefer a language based on what way it defines where a block of code begins and ends. I prefer a language on what's possible with it and what I want to use the language for. I tend to dislike Python because it's not that fast, and with some small Tkinter apps you can defiantly notice it. I also dislike Python because there is a lack of game libraries for it(PyGame sucks, PyGlet is good, but Cocos2d is recommended for game development. Cocos2d isn't well documented and hasn't got a big community). Lua is simple, easy to learn, powerful, and has a game framework: LÖVE! The framework is well documented, has a good sized community behind it and plenty of people are willing to help, and 99% of them are awesome people! I don't like Ruby because it's kinda slow, it does things in a strange way, and has some badly documented game frameworks. Rubygame is dead. Gosu is badly documented. Chingu hasn't got good docs either. Ruby and it's libraries don't have good communities -- if any at all! Java is great for games. There are 3 main frameworks, all of them are well documented and Java has a HUGE community behind it. All 3 have good communities. Java has great syntax and is really simple to learn.
Just my opinion on the topic
EDIT:
That wont happen. I asked this. Don't get me wrong, I'd love a Python version of LÖVE(and I've been temped to write a port myself, based on Cocos2d-Python, but then I thought I'd have no idea how to start). Why wouldn't there be? Well, LÖVE's philosophy is based on Lua's philosophy, from what I've been told. Robin can tell me if I'm wrong, and you could add to this.[...]but I'd just about give them all up if there was a Python version of Love[...]
EDIT 2:
Squirrel has a game library of sorts. It's not for the Desktop, but it's for iOS and Android. I've never used it. I do know Squirrel, but I prefer LibGDX for Android and iOS development because I like Java. Check out the emo game framework. It's free, open source and seems to be pretty good. Of course, you could always use Corona. One thing about the emo-framework is that it has no "pro" version. You don't pay for more features. Of course, you can donate, but AFAIK it doesn't give you any perks.
Last edited by Eamonn on Fri Aug 02, 2013 11:44 am, edited 2 times in total.
"In those quiet moments, you come into my mind" - Liam Reilly
Who is online
Users browsing this forum: Ahrefs [Bot], Bing [Bot], Google [Bot] and 3 guests