forum-msg-id-129053-edit

Original date:2015-11-08 19:14:43 Edited by: elias_maluko Subject: Re: Euphoria's inconsistent typing

SDPringle said...

Structures do not have to be poking and peeking memory but be aliases for numeric indexing for example:

Shawn you just read my mind on this one. I was thinking in this a bit different:

type rgb 
    integer red 
    integer green 
    integer blue 
end type 

I mean, replacing euphoria's 'type as function' by this.

SDPringle said...

And yes, function definitions ought to have obligatory types. You could always declare Them with object but if you force the user to declare what type it returns he will declare hopefully something.

What about the syntax for function type definition? Maybe something like Basic :o)

function foo () as integer 
  return 123 
end function 

Combining this new kind o type definition and function return declaration could speedup interpretation code and simplify the compiler.

Not Categorized, Please Help

Search



Quick Links

User menu

Not signed in.

Misc Menu