Get Rid of Source Code Templates
hackerboss.com
Get Rid of Source Code Templates
1–10 of 23 posts
Re: Get Rid of Source Code Templates
#2My Perl template is:
use MooseX::Declare;
class $classname {
}
My Haskell template is: module $module where
If you need anything more complicated than that, it's time to write code to fix the problem, rather than have your editor type the same text again and again and again and again.Re: Get Rid of Source Code Templates
#3How common that is might vary in different programming languages. It's quite common to share Javascript code by just swapping standalone .js files, and it's not uncommon in the Lisp world either.
Re: Get Rid of Source Code Templates
#4I use templates. My Perl template is: use MooseX::Declare; class $classname { } My Haskell template is: module $module where If you need anything more complicated than that, it's time to write code to fix the problem, rather than have your editor type the same text again and again and again and again.
The "templates" the article is talking about are large boilerplate comment blocks at the top of source code files, with license, attribution, changelog, etc. information. Nothing about executable code.
Re: Get Rid of Source Code Templates
#5Figlet output. Yay!
Re: Get Rid of Source Code Templates
#6I use templates. My Perl template is: use MooseX::Declare; class $classname { } My Haskell template is: module $module where If you need anything more complicated than that, it's time to write code to fix the problem, rather than have your editor type the same text again and again and again and again.
Comment not related to the article. The "templates" the article is talking about are large boilerplate comment blocks at the top of source code files, with license, attribution, changelog, etc. information. Nothing about executable code.
Re: Get Rid of Source Code Templates
#7It may be ridiculous for that author but it's quite important.
Re: Get Rid of Source Code Templates
#8Re: Get Rid of Source Code Templates
#9These templates are written for a reason. Some companies DO write templates to make their files "standard". This is nothing new especially in a corporate environment.
Re: Get Rid of Source Code Templates
#10"This means that you don’t need to do anything to have copyright over your works."
But you DO need a copyright notice to collect damages for infringement. Without a notice, the most you can get is an injunction to stop infringement.
"Often, source code files repeat the file name in the file itself."
So you can tell which file when printing, or when viewing through a broken web interface.