2009/1/14 Neil Mitchell <ndmitch...@gmail.com>: > Hi > >> 1) In a Python string it is available the \U{name} escape, where name is >> a character name in the Unicode database. >> >> As an example: >> foo = u"abc\N{VULGAR FRACTION ONE HALF}" > > Hmm, looks nice, and sensible. But as soon as you've got \N{....} syntax I > want: > > "foo\E{show i}bar" > > i.e. embed expressions in strings. I think this would be fantastic.
Hi, why not simpy "foo\E{i}bar" ? >> 2) In Python it is possible to import modules inside a function. >> >> In Haskell something like: >> >> joinPath' root name = >> joinPath [root, name] >> importing System.FilePath (joinPath) > > Looks a bit ugly, but kind of useful. I'd make the syntax: > > joinPath' root name = joinPath [root,name] > where import System.FilePath(joinPath) > > It does mean you need to read an entire file to see what functions it > imports, but perhaps that is the way it should be. I could also > imagine a syntax: > > joinPath' root name = import.System.FilePath.joinPath [root,name] > > i.e. doing an import and use at the same time. and why not simply System.FilePath.joinPath (without the import.) ? Cheers, Thu _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe