Cringe.
> And who among us can say they never created a new class or project by copying an existing one, and then deleting everything inside?
... Hey. No fair.
Cringe.
> And who among us can say they never created a new class or project by copying an existing one, and then deleting everything inside?
... Hey. No fair.
The New File option on Windows is one thing I really miss on MacOS. I set up a macro or something that added it in for text files years ago, but it got blown away when I changed machines or upgraded a few years ago and I can't remember how I did it. I could google it, but eh. I'll just have a moan about it next time I need to do it instead. Bah, humbug!
That creates files that, when opened, create a copy of themselves in the current directory and open that.
That’s a poor implementation (a good one would open the file as a new document ¿and tell the app the default directory?), but probably the best one an do without cooperation from applications. System 7 did that better, but only for applications that supported it, as did Lisa.
MS Word has a good implementation with .dotx files (https://support.microsoft.com/en-us/topic/create-a-template-...)
Start a new PCB Layout from scratch? Good luck getting the stack up and constrains correct.
Now what if: for OO languages the virtual methods can be adorned with both an example basic implementation and a comment with instructions.
Then when you do the “implement abstract methods” IDE shortcut it fills in those example implementations.
Basically you are saying “they are going to copy paste anyway, let’s get them started off with a decent example”
Unles you’re referring to a more “Githubcopilotesque” solution…
Weird enough I never got used to it. My desire for templates is more on the implementation level. For example when I need to draw a circle, I google for "SwiftUI custom shape", then copy/paste a working example, and from there, edit the "template" until I've got something going.
That’s exactly what the OS/2 workplace shell did back in the early 90s: You had a “templates” folder where you would drag one of the many notebook-like icons and drop a brand new and empty file of the corresponding type.
When installing OS/2 programs they would register new file types and create a template in this special purpose folder. Man, that were exciting times!
Didn’t Ubuntu also support templates up to a point?
As far as I understand it, it's a Freedesktop.org standard.
The problems normally relate to maintenance and change over time:
1. We reject classical-inheritance-emulating-prototypical-inheritance because it makes it hard to change the original. But copying a file and changing it doesn't have this problem, since the copy and the original are forks. If you need to make changes to both files, then you need to make changes to both files.
2. We prefer classical inheritance because a class is a description of how you can use an instance of that class. The class definition is usually very declarative and lends itself to great tooling support. Prototypical inheritance is imperative by its nature. This means there's no generic answer to the question, "How can I use this object", but only "how can I use this object right now?". But copying a file and changing it doesn't have this problem, since the copy and original are data, whose use is determined by external tools.
Another commenter in this thread specifically claims that prototypical inheritance was derived from this model (with a sense of optimism and joy, I think). But the fact that one extension of this model failed didn't mean the whole model is a failure. In this case, the suggestion is just to recognise what a user is doing and facilitate that. I think that's a lot less trouble than a language feature. (Actually, I think Jet Brains IDEs have a lot of features that tend towards this. They just might not be quite there.)
1) Learn to understand that programs create files
2) Learn which program creates a .doc file
3) Learn how to open program and where the File|New command is
5) Getting all the metadata / header / footers etc. correct
I just copy -> rename -> open -> select all -> delete
For example, when (being dragged into) making PowerPoint presentations, I tend to manually style two or three slides (e.g. title page, chapter divider, content slide), and then create actual slides through "Right click -> Duplicate Slide".
I'd really like to just start making all of my multiplied documents as database forms that just pull from a central data source. I haven't found an easy way to do this that works on both Linux and Windows and can pull from a central source over the network (besides implementing it myself in php/mySQL, which is a few orders of magnitude more work than just making a LibreOffice template).
Basically you could create a file, then mark it as a "Stationery Pad". Next time you double-clicked it in the Finder, it created a copy and then opened the associated application.
Instant templating in a way that ordinary users understood.
(And yes, it still works on OSX/macOS)