[email protected]
[Top] [All Lists]

Re: [Haskell-cafe] Re: Allowing hyphens in identifiers

Subject: Re: [Haskell-cafe] Re: Allowing hyphens in identifiers
From: Daniel Fischer
Date: Wed, 16 Dec 2009 16:47:05 +0100
Am Mittwoch 16 Dezember 2009 16:08:43 schrieb Colin Paul Adams:
>
>     Daniel> Database.Haskell_DB.Sql.Postgre_SQL
>
> Actually, I would be semi-happy with Database.Haskell-DB.Sql.Postgre-SQL
>
> (obviously we need an option whether to use hypens or underscores. I
> prefer hyphens.)

That's no problem. Hyphens would also circumvent the Network.URL problem :)
Of course, you'd have to set up a not-too-complicated way to type \x2010 in 
your editor.

>
> I think I prefer shift-left :-)

Sure, mate, that's absolutely not going to be a   :-/
Use
(.<<.) = shiftL
(.>>.) = shiftR
instead?

> I'd settle for the last.

Also map_m and fiter_m &c? And map_m_, for_m_ ?
Resp. shift-l, map-m, map-m_ ?

Would that be
4) flatten, when followed by lowercase letter, nothing or underscore?

>
>     Daniel> Generally, when shall we flatten the hump, 1) always --
>     Daniel> not 2) unless followed by an uppercase letter 3) when
>     Daniel> followed by a lowercase letter
>
> I'm nit sure. i think a more sophisticated rule might be needed.

Okay, let's start to find it. We won't find something which is perfect in all 
cases, but 
perhaps something that's good enough in almost all cases and never too ugly.

Should aBC... -> a_BC... / a-BC... in all cases? If not, in which cases what 
other 
behaviour?
Should aBc... -> a_bc... / a-bc... always? If not, what else?
aB -> a_b /a-b ?
aB' -> a_b' /a-b' ?
aB_ -> ?
aB'c... -> ?
aB'C... -> ?

>
>     Daniel> feedO'Houlihan?
>
>     Daniel> IMO, it should clearly go to feed_O'Houlihan
>
> Yes, I think so.

_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

<Prev in Thread] Current Thread [Next in Thread>