Re: dot pre-processor

new topic     » goto parent     » topic index » view thread      » older message » newer message
jeremy said...

It's not connected to OOP, however, if OOP comes to Euphoria, it may use a similar syntax, thus causing a conflict, that's all. I think we need discuss the hard details of OOP and Euphoria before making the interpreter do anything remotely OOP like.

I don't think that there is any necessary conflict. Therefore your phrase "thus causing a conflict" should be worded more like "thus might cause a conflict", IMO. However, I agree that a lot of discussion needs to happen before we add built-in OOP facilities into the language.

jeremy said...

For instance, DOT syntax does this:

sequence name = "John" 
? name.length() 
 
-- Or 
enum FirstName, LastName 
sequence person = { "John", "Doe" } 
printf(1, "Hello, %s! Your last name is %s?", { person.FirstName, person.LastName }) 

Both of those could very much conflict with OOP, if it were to come to Euphoria.

It is possible, I suppose, but in these examples, the 'name' and 'person' objects are sequences and that could be detected at parser time and thus the correct IL code could be generated, and this would not be in conflict with dot notation used in other manners.

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu