Skip to content
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

CLI: default zig <path> to be zig run <path> to allow drag-and-drop execution on Windows #17212

Closed
expikr opened this issue Sep 20, 2023 · 2 comments

Comments

@expikr
Copy link
Contributor

expikr commented Sep 20, 2023

On windows, if you drag and drop a file onto an executable, it is equivalent to running <exec file> <dropped file>.

This is particularly useful for the “teach your friend to code” use cases where the quick-start instruction boils down to:

  1. Download and extract zig
  2. Write your Hello World and drop it onto zig.exe

I know ideally one should teach the “proper way” starting off learning how to use the CLI or IDE, but I think reducing these kinds of minute “gateway friction” really goes a long way in minimizing the initial intimidation factor esp for those who are not yet technically inclined.

Zig being relatively “small” is ideal as a first language so I think there is a great opportunity here to polish some of these trivial details that are typically overlooked in other languages.

@zekexiao
Copy link

zekexiao commented Sep 21, 2023

in dlang, it has a tool 'rdmd' to call dmd complier and run it, just like a scripting language

IMO if yor're learning zig, should learn the difference between compiled and script

@andrewrk
Copy link
Member

I've already thought a lot about this and decided against it. For the "teach your friend to code" use case, what I think should happen is the VSCode Zig extension should automatically install zig for you and walk you through creating an application. Ideally it would even have a template for gui programming so that new programmers don't have to learn about terminals.

@andrewrk andrewrk closed this as not planned Won't fix, can't repro, duplicate, stale Sep 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants