Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
gmueller
Apprentice


Joined: 06 Apr 2004
Posts: 173

PostPosted: Sat Aug 04, 2007 8:17 pm   

language feature request
 
I know that there is a difference between:

#VAR test {3}
and
#VAR test 3

one being a string and the other being an integer, but I'm sure this will be a syntax that many people will openly and not so openly get wrong. I'm sure that you can make a smart compiler, but what I think would be better is just adding a:

#INTEGER test {3} {0}
and a
#REAL test {3.1} {0.0}

// could be #FLOAT or #DOUBLE but these have reference to a particular size and you're probably using a #LONG_DOUBLE so these are less desirable

#BOOLEAN {0} {0}

//could be #BIT or, #LOGICAL

I think it's much less confusing this way, and I'm sure people will make less errors with their scripts.
Reply with quote
gmueller
Apprentice


Joined: 06 Apr 2004
Posts: 173

PostPosted: Sat Aug 04, 2007 8:31 pm   
 
I guess part of my reasoning comes from this... when I first starting talking on guild channels I'd get yelled at because I didn't start my sentences with a capital letter, and end with a period...

The brackets {} just seem like good grammar to me.

It makes the command feel more formal, but when you mix and match it feels lazy. And it's also something that a beginning programmer won't recognize at first. Anyway, take care.

I think I've heard before that you were saying that you treat the brackets as though it were a "", but I think the truth of the matter is, { != " It is a different symbol. There's a reason people might not internally think they are different. Lexically they are different.

and the finny thing is, even if you were to put #VAR "0" what's to say that this is a string or a number, as there are no brackets.

Ok, my point is, it's confusing.
Reply with quote
Larkin
Wizard


Joined: 25 Mar 2003
Posts: 1113
Location: USA

PostPosted: Sat Aug 04, 2007 8:48 pm   
 
I think that what you're asking was already discussed in a much earlier thread.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net