(Dang. Wordy post, and almost completely unrelated to my proposal.)

> I guess I'd be in favor of it, but yet I'm not terribly excited about  
> it. I wonder why...

Casting is unfortunately an often useless and ill designed feature in
Pike; that might account for some of the dispassion. You can only cast
to primitive types, and value casts don't necessarily work, even if
you know a value to be a string and want to cast it to an int, when
declared a string|int. It's a system difficult to grow incrementally
better too, unfortunately.

Even though in some ways it's a syntactically very powerful operation
on recursively casting a large data structure into another, using
compound type casts like (array(string)). It just doesn't reach do all
that much more, when you don't primarily work with primitive types.

I'm not really bashing the lack of design in Pike; its evolved nature
is what makes it good, too. But casts, at least to me, feel a bit like
a dead end.

The thought crept up on me after reading The Pinocchio Problem,
http://steve-yegge.blogspot.com/2007/01/pinocchio-problem.html --
while not technically dead code, pike and casting feels like it has
hit an evolutionary dead end. Small convenience changes like the one
suggested might be within reach, but order of magnitude improvements
are out of reach. With a bit of luck I just might know too little of
pike's internals to be right about this.
  • Default cas... Johan Sundstr�m (Achtung Liebe!) @ Pike (-) developers forum
    • Defaul... Peter Bortas @ Pike developers forum
      • De... Johan Sundstr�m (Achtung Liebe!) @ Pike (-) developers forum
    • Defaul... Henrik Grubbstr�m (Lysator) @ Pike (-) developers forum
      • De... Johan Sundstr�m (Achtung Liebe!) @ Pike (-) developers forum
    • Re: De... Johan Sundstr�m (Achtung Liebe!) @ Pike (-) developers forum
      • Re... Martin Bähr
      • Re... Peter Bortas @ Pike developers forum
        • ... Johan Sundstr�m (Achtung Liebe!) @ Pike (-) developers forum
          • ... Henrik Grubbstr�m (Lysator) @ Pike (-) developers forum
            • ... Johan Sundstr�m (Achtung Liebe!) @ Pike (-) developers forum

Reply via email to