GLSL isn't complex at all, least of all because its problem domain is basically pure math.
It should take less than an afternoon to understand how to write a shader if they have any familiarity with math.
If they don't know math, they shouldn't be doing shader programming until they learn.
I agree, though, that shader writing should help with learning 3D math. Saying GLSL is not complex is a bit of an overstatement, though. The language is simple, but the fact is that GLSL doesn't behave like C with certain statements, and not knowing everything will make things complicated.
You've also described a chicken-and-egg problem. Can't make a 3D app till you learn GLSL, can't use GLSL until you make a 3D app.
It also feels absurd to be writing any static language code wrapped in a string, in JavaScript, to be sent to a GPU and then compiled. The user doesn't have newlines, let alone syntax highlighting. Sure, most WebGL developers will just use Three.js but then they aren't really learning anything, anyway, and we still have these patchwork solutions.
Shaders are a step in the pipeline. Beginners should be learning the pipeline:
1. Geometry is instantiated and draw parameters set.
2. Geometry vertices are transformed by a vertex shader.
3. Transformed vertices in primitive are used to sample across its geometry, producing pixel fragments.
4. Pixel fragments are transformed by a fragment shader.
5. Transformed fragments are written to a framebuffer.
That's the whole thing, and GLSL neatly handles 2-4. Step 1 is a kinda pain in the ass, but not terrible. Step 5 is usually simple, but no worse than 1. We shouldn't be protecting users from dealing with the (simple) facts of life in a graphics pipeline.
As for Javacsript not having multi-line strings...that's hardly the fault of WebGL, and honestly the simplicity of passing around strings means that as the language gets more interesting support (for interpolations and whatever) the API will be unaffected.
A good one!
Just take a glance over at StackOverflow and consider how many questions there essentially boil down to lack of understanding how the pieces in the compiler toolchain fit together:
http://lmgtfy.com/?q=stackoverflow.com%20undefined%20referen...
In workshop class a teacher will also start with explaining how to properly handle a tool before showing how to apply said tool to a problem.
The original comment was - "When writing my first OpenGL code, I was stunned by the amount of boilerplate required."
Your response was - "the amount of boilerplate required ... is minimal."
It's clearly not minimal because we've outlined ways it could be reduced. Your counter-example of writing larger programs doesn't solve the issue of drawing a single triangle. Don't confuse a local minima for a global minima and don't confuse your experience with every noobie's experience.
Although I would say it looks minimal compared to an early D3D application.