You need to log in to create posts and topics.
FB OOP Syntax
1,678 Posts
#1 · November 6, 2009, 9:01 am
Quote from Forum Archives on November 6, 2009, 9:01 amPosted by: nerimic <nerimic@...>
If You agree we can try to define some hypothetic syntax for OOP.I think that we should try to stay as close as possibe to Obj-C.Start blathering:My provocative proposal is to just drop the ";" as line delimeter.i.e. message sending:(example taken from http://en.wikipedia.org/wiki/ObjectiveC#Objective-C_2.0)[obj method:parameter]Actually I believe that we can change also some structure syntax for match the FB paradigm:interface classname : superclassname...end interfaceclass classname : superclassname...end classmethod sqrrt( "root":r as double, "index":j as double) as int...end method = result(I'm not sure about the pseudo-naming syntax).Also I believe that we should avoid the inline definiton and assignment statement:Recipient * recipient = [Recipient new];to:dim as ^Recipient recipientrecipient = [Recipient new]end blathering.Michele.---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
Posted by: nerimic <nerimic@...>
If You agree we can try to define some hypothetic syntax for OOP.
I think that we should try to stay as close as possibe to Obj-C.
Start blathering:
My provocative proposal is to just drop the ";" as line delimeter.
i.e. message sending:
(example taken from http://en.wikipedia.org/wiki/ObjectiveC#Objective-C_2.0)
[obj method:parameter]
Actually I believe that we can change also some structure syntax for match the FB paradigm:
interface classname : superclassname
...
end interface
class classname : superclassname
...
end class
method sqrrt( "root":r as double, "index":j as double) as int
...
end method = result
(I'm not sure about the pseudo-naming syntax).
Also I believe that we should avoid the inline definiton and assignment statement:
Recipient * recipient = [Recipient new];
to:
dim as ^Recipient recipient
recipient = [Recipient new]
end blathering.
Michele.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
Click for thumbs down.0Click for thumbs up.0