On Mar 12, 2015, at 4:54 PM, Sven Van Caekenberghe-2 [via Smalltalk] <[hidden email]> wrote:
The scheme is not optional, it defines what (kind) the URL is. You are expecting behaviour such as in a browser's address bar. But there, there is context (you are expecting an HTTP URL).

I did see the defaultScheme: variant. I���m not saying we should necessarily assume HTTP. I���m just saying if someone gives us a string like 'www.hm.com��� (which I agree is incompletely defined), why set #segments and not #host? Even with scheme = nil, the following would be more useful:
'www.hm.com' asUrl host = 'www.hm.com'. 
'www.hm.com' asUrl segments = m') an OrderedCollection()
Cheers,
Sean


View this message in context: Re: ZnUrl: Constructing without Scheme
Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.