Deprecating `require.extensions` is unfriendly to developers who want to 
require a template file.

No, I don't want to have to add more layers of complexity to my build 
process, thank you. I just want to use *custom* logic for my app/platform. 
I don't have other users, it's my sandbox, thank you. Please don't tell me 
what's good for me, I know what's good for me, thank you!

On Thursday, May 9, 2013 at 8:29:36 PM UTC-4, ~flow wrote:
>
> i recently opened an issue https://github.com/joyent/node/issues/5430
> concerning require.extensions, and got told that 
>
> "People should not be using require.extensions. It's officially 
> deprecated", "Compile your code to JavaScript prior to running it." "There 
> is never any need for additional filetype extensions. Node runs 
> JavaScript"; "we're not bothered with tens of other dialects that require 
> compilation and are written in code that's not readable for JavaScript 
> programmer"; "stop relying on this horrible feature"
>
> in no unclear words. i was a little shocked, since my perception has 
> always been that require.extensions was the strike of a genius. with little 
> effort, you can hook in filetypes and make it so that they are require'd 
> transparently, no matter whether they represent data / programs as 
> javascript, json, coffeescript, whatever. 
>
> ok it's a global hook which, in theory might lead to problems (but in 
> years of writing coffeescript hasn't been a problem even once.
>
> i love the fact that i do not have to compile everything in advance / add 
> a buildscript / are forced to keep a coffeescript watch process in the 
> background. coming from python, i was also very happy to see that those 
> pernacious *.pyc files that used to litter my directories were now a thing 
> of the past—i mean, that is code duplication enforced by the system, 
> utterly avoidable.
>
> to me, javascript is a wonderful language with some rough edges and a 
> horribly cluttered syntax. now here comes nodejs and all those wonderful 
> home-grown programming languages that take advantage of the great compiling 
> target that javascript running on nodejs is. dumbing down `require` will be 
> sad news for all the many people that are using those new languages daily.
>
> as a user of coffeescript, the fact that coffeescript compiles to 
> javascript is a fact that i have to be aware of, but it is not something 
> that i want to be (or need be) constantly reminded of. doing on-the-fly, 
> transparent compilation is the way to go; it has never been any appreciable 
> drain on resources, either. it sure will continue doing things that way. 
>
> if they kill require.extensions with no sensible replacement, things will 
> just get more difficult. it won't be too difficult to come up with a 
> sensible replacement—one could even predict that sooner or later, there 
> will be modules in npm that will allow you to `require 'old-require'` to 
> replace the new require with the good ole'. gone a bit of efficiency, gone 
> a bit of standardization.
>
> so what are the good, the bad and the ugly facts about require.extensions? 
>
>

-- 
Job board: http://jobs.nodejs.org/
New group rules: 
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/nodejs/b0507664-5413-41dc-9b17-112caf6f3698%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to