with(PersonClass = function(){
console.log("Person created!")
})
{
prototype =
{
name : "John Doe"
}
}
Другие, не менее интересные способы: http://stackoverflow.com/questions/19977298/create-class-by-merging-function-and-object-in-one-statement-alternative-way-to
UPD:
with(BlockingCenteredWindow = function()
{
var instances_counter = 0
return (function()
{
this.id = ++instances_counter
})
}())
{
prototype.render = function()
{
console.log(this.id)
}
}