-
-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Syntax experiment: String format syntax eg "$(x, digits=2)"
#308
base: main
Are you sure you want to change the base?
Conversation
Can we use semicolons to start keyword arguments here? |
Certainly! But is it a good idea to diverge from the syntax for keyword args supported everywhere else in the language? |
Uhm? Keyword arguments do start with semicolons in the language already, sadly that's optional and using commas can lead to not-so-fun-to-debug problems. |
Haha! I do know about this. And some other fiddly details of Julia's syntax ;-) My point is, I think it'd be confusing not to support the comma notation, given that it's supported and extremely widely used for normal function calls. I think consistency is more important here than trying to fix problems which can't be fixed in the other more widely used syntax due to compat concerns. |
I also kinda feel like semicolons might be good here, but it's not a super strong opinion. For one thing it wasn't obvious to me (before I checked) that
This isn't the right forum/issue - but I rather like the idea of having something like Rust's "editions" to make breaking syntax improvements over time (without needing e.g. Julia 2.0), hence I'd challenge what "can't" be done (eventually...). |
I agree with this and I've been thinking a lot about it for a while :-) I don't know exactly how it should work yet but I've been wanting to write a julep on it :) |
See |
See JuliaLang/julia#18703
CC @simonbyrne