Open kgksoft opened 11 years ago
IIRC, this was done for the objective-c bridge. Objective-C has methods like [point setX:0 y:1]; which, using colons in identifiers, we could directly translate to: point setX:y:(0,1). An update would requiring updating the ObjcBridge code as well. Does it seem worth it?
Can you using other symbol?
point setXy or point setX.y. ?
I think that's a good idea and it's what I did with the Lua/Objective-C bridge I wrote (many years ago) but lately I've been seeing Objective-C method names that contain an underscore, at least for the first character. Maybe it would be helpful to see what other bridges are doing these days? Treating colon as special does seem awkward and was probably a mistake in retrospect. Then again, optional use of spaces and the ambiguity in meaning they imply also seems like an unnecessary source of confusion and extra logic.
My dream, using Io as main language in ERP-system. That would be cool :) Language-syntax must be simple and understandable. I always mistaken by a colon. I think others too.
What do you think of the idea of making syntax entirely unambiguous in the sense that a given AST tree can only be expressed as source code in exactly one way?
https://developer.apple.com/library/mac/documentation/AppleApplications/Conceptual/SafariJSProgTopics/Tasks/ObjCFromJavaScript.html Any colon (“:”) in the Objective-C selector is replaced by an underscore (“_”). Any underscore in the Objective-C selector is prefixed with a dollar sign (“$”). Any dollar sign in the Objective-C selector is prefixed with another dollar sign.
AST tree. I only one time read DragonBook :) I think lexical analyzer in iovm not so bad to be rewritten.
Following the apple convention sounds reasonable though $ would then be an operator that requires special treatment.
At this point I'd probably favor removing the colon in identifier rule as well. Objective-C integration isn't that important any more.
cool. i think IO best language what i know. :)
Thanks :)
Hello
Colon in Identifier very annoying. i must write: a :=2 instead a:=2
We have a lot of assignments and i find only 1 file with colon in Identifier. addons\ObjcBridge\samples\objc2ioTest.io This really necessary?
Can you or i rewrite IoLexer.c for getting rid of the colon in identifiers?