<jlouis>
you see, {foo : int, bar : string} looks awfully much like it has type int * string
<jlouis>
so, the naming aside, it could as well be a tuple
<mellum>
So you can pass it to a function that expects a record with different labels?
<Smerdyakov>
No
postalchris has joined #ocaml
<jlouis>
It still has to work out from a typing perspective
<jlouis>
so in particular, the type must not be ambiguous
<flux__>
smerdyakov, but you can pass it to a function expecting less labels?
<Smerdyakov>
flux__, no.
<flux__>
hmm..
<mellum>
that would be pretty bad...
<Smerdyakov>
flux__, SML has no implicit subtype coercions.
<flux__>
hmm.. I guess that leads to type annotations?
<Smerdyakov>
flux__, depends on the context
<flux__>
because if a function doesn't use all the fields of the record it has been as a parameter, it needs to explicitly state that it will use the rest too
<flux__>
assuming there is a certain record that is passed around to many functions
<Smerdyakov>
flux__, yes. Other typing constraints may make that clear.
<flux__>
not very different from ocaml objects, which too need to be either explicitly defined or explicitly narrowed
<flux__>
I suppose the implementation uses similar algorithms
<flux__>
sometimes I would wish it would be able to automatically narrow them, but apparently its more difficult than it sounds
<mellum>
Hmm. I'm not convinced I like the SML concept better here. It seems you need to take much more care about naming your fieldn names uniquely, then
<flux__>
why would they need to be uniquely named?
<Smerdyakov>
mellum, it's OCaml that requires such care.
<flux__>
definitely
<mellum>
flux__: for type inference to work.
<mellum>
But maybe I'm still misunderstanding it...
<flux__>
basically I often declare type foo = { foo_x : int; foo_y : string }
<Smerdyakov>
mellum, unique names don't help type inference at all.
<mellum>
flux__: which is exactly what I would not like to do
<Smerdyakov>
mellum, and there are no principal types for SML code that uses records.
<flux__>
the names need to be unique within a record :-)
<Smerdyakov>
mellum, so perhaps the wrong assumption was that "type inference works." :)
<mellum>
Smerdyakov: I don't know what "principal type" means.
<flux__>
but in sml you can have two record types (you can declare them too, can't you?) which both have field 'x', but of different type
<Smerdyakov>
mellum, every type-correct expression has a type that subsumes all possible valid types the expression could be given.
<flux__>
and then you have functions which expect either {x : int} or {x : float}
<mellum>
Hmm. Looking at http://www.cs.berkeley.edu/~adamc/mlcomp/, I find about half the time Ocaml better and half the time SML. Maybe I should invent my own language ;)
<Smerdyakov>
mellum, what are the main things that enamor OCaml to you?
<mellum>
Smerdyakov: Availability on my machine (Alpha Linux). And I know it already.
<Smerdyakov>
mellum, ah, so nothing about language design or even library design.
<mellum>
Well, the library design is crap.
<mellum>
Not as bad as C, but still crap
<Smerdyakov>
OCaml's?
<mellum>
Yes. I don't know SML's.
<Smerdyakov>
SML's Basis + SML/NJ Library is totally gnarly.
<mellum>
worse than Ocaml?
<Smerdyakov>
No, gnarly is a _positive_ description. :)
<mellum>
Oh. Well, English is not my first language :)
<Smerdyakov>
Hey, that reminds me. We have any French people watching here now?
<haelix>
Count one for me
<Smerdyakov>
haelix, if I am going to POPL in Nice, how much French currency should I get from an ATM, assuming I will try to use credit card wherever possible? I will be there 5 days.
<haelix>
what expanses will you have to cover ?
<Smerdyakov>
haelix, just incidental stuff like buses, maybe some meals. It's mostly paid in conference reg. fees and hotel bill (which I will do with CC).
<haelix>
Buses can be an expansive thing in that nice Nice region
<Smerdyakov>
(BTW, it's "expensive" for that meaning.)
<haelix>
oh right
<haelix>
this is hard to tell but I'd say you'll be comfortable off with 200 euros
<haelix>
comfortably
<Smerdyakov>
haelix, OK, thanks!
<Smerdyakov>
Will I need some exact change to pay bus fares?
<haelix>
Last I was here, bus drivers had change, but having some won't hurt
<haelix>
do you know where you'll be hosted ?
<Smerdyakov>
Yup: the conference Hotel, Plaza.
<haelix>
ok, so not much need for bus, then
<Smerdyakov>
The conference web site says a 15 minute bus ride from the airport.
<haelix>
I thought it would be an dayly bus trip
<haelix>
so well
<haelix>
no need for change: you'll buy your ticket not from the bus driver
<Smerdyakov>
OK. Sounds a lot more rational than our buses here in the USA. :)
<haelix>
it should not be more than 2x10 euros
<haelix>
as for drinks
<haelix>
I deem them expansive
<Smerdyakov>
I usually just drink water, so no worries there.
<haelix>
(5 euros can easily be spent on a beer)
<Smerdyakov>
Maybe that costs money in France..?
<haelix>
tap water is free
<Smerdyakov>
But deadly? :)
<haelix>
and you'll have more than decent meals for 20 euros
<haelix>
well, as for deadly I don't know, but it craves at being tasteless
<Smerdyakov>
I will be reimbursed for all expenses, so anything that can go on my credit card is not an issue for price. ;)
<haelix>
then I'd say.. go for 100 euros
<Smerdyakov>
Another thing that I'm wondering is: is it customary to leave a tip in your hotel room each day for the maid?
<haelix>
(I had booked a lot for bus fees)
<haelix>
no
<haelix>
it's of course nice, but mostly unusual
<flux__>
hm, how about tips in general?
<haelix>
it's quite common to feed the paypal account of gentle IRC informers :p
<haelix>
other than that, this is not required at all, imho
<Smerdyakov>
The French embassy has a web page that explains tipping customs.