Repository navigation
Allow extension-less files #3305
Replies: 2 comments 20 replies
|
Having random endings work is not exactly my favorite feature of C/C++. It leads to all sorts of painful things. So I don't think this is a good idea. |
|
I think we've reached the point where we're repeating ourselves. I'm not saying that it can't be implemented. However, for a feature to be added to C3, "it can be implemented" is not sufficient. There needs to be a clear benefit that justifies the downsides. So far the benefits presented are mostly aesthetic preferences, Unix tradition, and a few niche workflows. I don't see those as sufficient advantages to outweigh the downsides. I am not adverse to something like |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Basically I was following https://c3-lang.org/getting-started/hello-world/
But forgot the
.c3ext.Since this is something that annoyed me in python (
import machinery, bla, bla)And with
c3cbeing smaller blast radius, I thought it would be fun to allow for this.But my guess was that you'd want to be able to do something like:
Or also allows to compile something like
myapp.bakContents of
project.json{ // Explicit, extensionless file paths exercises the dotless-source support "sources": [ "main", "src/calc", "src/utils/mathutil" ], "output": "build", "targets": { "main": { // executable | static-lib | dynamic-lib | test | benchmark | object-files | prepare "type": "executable" } } }expected output of
c3c run:This notably only would need one extra edge-case check: for output files to not overwrite when input = output (
-onot specified).For this I thought we can borrow
cc/gcc/clangand their.outwhich is familiar.This also doesn't affect glob patterns paths.
Mostly already seems to work fine in my fork's master
Tested a bit of edge cases and was fun to play around with :)
All reactions