Replies: 15 comments
-
I'm personally in support of the |
Beta Was this translation helpful? Give feedback.
-
are you proposing these changes be on the stable branch, or the experimental branch? |
Beta Was this translation helpful? Give feedback.
-
Experimental. Maybe even as a subcommand: |
Beta Was this translation helpful? Give feedback.
-
Which would mean a new repository under the CrabLang umbrella. ^ This is probably the easiest way to start. |
Beta Was this translation helpful? Give feedback.
-
This is an excellent proposal! |
Beta Was this translation helpful? Give feedback.
-
why not support both extensions? |
Beta Was this translation helpful? Give feedback.
-
Are you suggesting supporting both |
Beta Was this translation helpful? Give feedback.
-
i've been working on adding support for |
Beta Was this translation helpful? Give feedback.
-
i propose crablang/wastebasket#11 ( .🦀) |
Beta Was this translation helpful? Give feedback.
-
i opened a PR in the crabgo repo that changes |
Beta Was this translation helpful? Give feedback.
-
@trvswgnr why not .🦀#53 .🦀 |
Beta Was this translation helpful? Give feedback.
-
What about making something like crabgo convert rs crab which would mean rs => crab crabgo convert crab rs crab => rs |
Beta Was this translation helpful? Give feedback.
-
I like this proposal. I think it might be my new favorite. Will update the issue with it |
Beta Was this translation helpful? Give feedback.
-
Keep There is absolutely zero reason to invent new extension for a language that has the same syntax. In case crab codebase significantly diverges from upstream (which I doubt very much, given current nature of the project), syntax can be disambiguated using editions in |
Beta Was this translation helpful? Give feedback.
-
I very much like @nonetrix 's proposal over here for the
.crab
file extension: #18 (comment)Why?
It allows users to show their support for CrabLang on their GitHub repos!
Its cool 🦀😎
How?
I think we can make this work and still be compatible with r*st. We would just need a
crabgo
command to do the conversion. Probably something like:crabgo crabify
: .rs -> .crabcrabgo rsify
: .crab -> .rsFor extra credit we can add a command to configure git with
pre-commit
and other.gitattributes
that properly convert and / or compare.rs
and.crab
making for a frictionless developer experience. Something like:crabgo gitify
Edit: typo
Edit: New proposed Commands per discord discussion here: https://discord.com/channels/1074804478651400303/1095989994033782814/1096842935049404447
crabgo convert rs-to-crab
: .rs -> .crabcrabgo convert crab-to-rs
: .crab -> .rsWith the following shorthands:
crabgo convert crab
=crabgo convert rs-to-crab
crabgo convert rs
=crabgo convert crab-to-rs
Edit:
Some common questions have been:
Will we still support
.rs
?Answer: Yes
I intend for the tool to make developing with both .rs and .crab a frictionless experience. Meaning it will allow libraries written in both .crab and .rs to work together.
Will this be in main / master?
No. It will either be in an experimental branch or as a subcommand in a new repository. I personally think the subcommand in a new repository is the best way to start. Here's some documentation to reference until we get the crabgo docs up: https://doc.rust-lang.org/book/ch14-05-extending-cargo.html
Edit: My new favorite proposal is from @mrquantumoff here
What about making something like
crabgo convert rs crab
which would mean rs => crab
and
crabgo convert crab rs
crab => rs
I think this is the perfect approach. Its just the right amount of verbosity. It ready from left to right as "from -> to" as most programming languages (all that I've used) do.
I think it completely does away with the need for shorthands.
Beta Was this translation helpful? Give feedback.
All reactions