[Gllug] OSS CMSs

Nix nix at esperi.org.uk
Fri Apr 29 14:21:12 UTC 2005


On Fri, 29 Apr 2005, Doug Winter murmured woefully:
> Nix wrote:
>> On Thu, 28 Apr 2005, Doug Winter said:
>>>I'm intrigued - can you give me an example of your point?
>> <http://perl.plover.com/yak/typing/>
>> (Despite the title, this is mostly about ML, not Perl: it's just that
>> it's targetted at Perl hackers :) )
> 
> OK, I agree, mostly, I think.  Strong Typing is a Good Thing, but
> Python has that.

It doesn't remotely begin to have strong typing and type inference a la
ML. Strong typing without those features gets in your way: with it, it
finds bugs --- even quite subtle ones --- for you.

I think non-type-inference-based typing should be called something else:
`police state typing', perhaps, because it insists you type things even
when it's bleeding obvious what type they are, and swallows the most
ridiculous stories as long as they agree with its paperwork.

>                   And this illustrates what I think I hate the most
> about perl:
> 
> http://perl.plover.com/yak/typing/samples/slide033.html

MJD doesn't like it much either :)

> I'm not so sure about static compile-time type checking though - it
> seems to make a lot of sense when you are dealing with primitives, but
> when you start passing round objects (which you tend to) it gets very
> messy.

It doesn't if you have a competent type checker. Python's isn't
competent, although it's better than the crap you get in Algol-derived
languages. [Paging Richard Jones]

> That said, there are times when it would be very good to be able to
> enforce typing on function arguments, and this is coming up shortly in
> Python too, from the sound of it, using decorators.

That's not what proper typing systems do. They generally *infer* the
types of nearly all your variables, and moan if you've declared
something contradictory or done something wrong given those inferred
types.

So you specify just those types you want to specify (generally just the
composite types in the parameter list) and that's *it*. Everything else
falls out for you.

> God, I really sound like a Python cheerleader.  I'm not a foaming at
> the mouth python freak honest! :)

I am, and I still think its typing sucks compared to, say, Haskell's.
And even *that* sucks compared to Cayenne's --- but Cayenne suffers from
no easily compilable implementation, horrible docs, obscurity, and a
type system so powerful that compilation is no longer guaranteed to
terminate.

(But where *else* can you specify parameters whose *types* depend on the
*values* of other parameters in arbitrarily complex ways? Wow!)

-- 
This is like system("/usr/funky/bin/perl -e 'exec sleep 1'");
   --- Peter da Silva
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list