On Mon, Aug 20, 2012 at 2:42 AM, john skaller <skal...@users.sourceforge.net
> wrote:
>
> On 20/08/2012, at 5:35 PM, Dobes Vandermeer wrote:
> >
> > I don't feel confused about it. I'm very clear that "unspecified"
> shouldn't be the default!
>
> You're very clear because you don't understand what the impact is.
>
> It may be possible to actually find out: just fiddle the parser so
> everywhere
> a "val" is used, or default is var (including function parameters) is
> secretly changed
> to a var. Ie. completely get fid of vals. You will be able to address them
> but if you're
> code with the old grammar was ok you won't be doing that in the new
> version.
>
Er, and then what ... run some kind of benchmark?
> > So you already know it's a booby trap, from experience. Why not fix it
> for future programmers?
>
> As I have said many times: I do not know how.
>
... without marginally degrading performance?
> In fact a lot of this discussion was started by considering "const" being
> added.
> If you take "const" to mean "pure total strict" then consts could be
> evaluated eagerly
> or lazily without any change in behaviour, and we might be able to change
> the semantics of val since the key feature is now captured by const.
>
I wonder whether all of this is really of benefit to the programmer.
It seems like if the compiler can enforce this purity, it can detect it
also. And thus, it could "promote" any var or val to this const concept as
well.
Things like this be there to help the programmer in some way. If I want to
say "this doesn't change" it shouldn't so much for the optimizer, but also
help me write better code by constraining my own and others' behavior.
So I'm not sure this is actually a solution.
> But you can see I'm trying to attack the problem.
>
Right, fair enough.
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Felix-language mailing list
Felix-language@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/felix-language